import React, { Component } from 'react'
import { Text, StyleSheet, View , ActivityIndicator , Platform, Alert} from 'react-native'

export default class ActivityIndicators extends Component {
  render() {
    if(Platform.OS === 'android'){
      Alert.alert('注意', '当前是安卓应用')
    }
    if(Platform.OS === 'ios'){
      Alert.alert('注意', '当前是苹果应用')
    }
    return (
      <View style={styles.container}>
        <ActivityIndicator color="blue" size={'large'}></ActivityIndicator>
        <ActivityIndicator color="green" size={'small'}></ActivityIndicator>
        <ActivityIndicator color="orange" size={'large'}></ActivityIndicator>
        {/* 数字只能在安卓使用 */}
        <ActivityIndicator color="#00d0ff" size={70}></ActivityIndicator>
        <ActivityIndicator color="red" size={100}></ActivityIndicator>
      </View>
    )
  }
}

const styles = StyleSheet.create({
    container:{
        flex:1,
        justifyContent:'space-around',
        alignItems:'center'
    }
})

